home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / src / linux-headers-2.6.28-15 / include / linux / sunrpc / stats.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-12-24  |  1.7 KB  |  78 lines

  1. /*
  2.  * linux/include/linux/sunrpc/stats.h
  3.  *
  4.  * Client statistics collection for SUN RPC
  5.  *
  6.  * Copyright (C) 1996 Olaf Kirch <okir@monad.swb.de>
  7.  */
  8.  
  9. #ifndef _LINUX_SUNRPC_STATS_H
  10. #define _LINUX_SUNRPC_STATS_H
  11.  
  12. #include <linux/proc_fs.h>
  13.  
  14. struct rpc_stat {
  15.     struct rpc_program *    program;
  16.  
  17.     unsigned int        netcnt,
  18.                 netudpcnt,
  19.                 nettcpcnt,
  20.                 nettcpconn,
  21.                 netreconn;
  22.     unsigned int        rpccnt,
  23.                 rpcretrans,
  24.                 rpcauthrefresh,
  25.                 rpcgarbage;
  26. };
  27.  
  28. struct svc_stat {
  29.     struct svc_program *    program;
  30.  
  31.     unsigned int        netcnt,
  32.                 netudpcnt,
  33.                 nettcpcnt,
  34.                 nettcpconn;
  35.     unsigned int        rpccnt,
  36.                 rpcbadfmt,
  37.                 rpcbadauth,
  38.                 rpcbadclnt;
  39. };
  40.  
  41. void            rpc_proc_init(void);
  42. void            rpc_proc_exit(void);
  43. #ifdef MODULE
  44. void            rpc_modcount(struct inode *, int);
  45. #endif
  46.  
  47. #ifdef CONFIG_PROC_FS
  48. struct proc_dir_entry *    rpc_proc_register(struct rpc_stat *);
  49. void            rpc_proc_unregister(const char *);
  50. void            rpc_proc_zero(struct rpc_program *);
  51. struct proc_dir_entry *    svc_proc_register(struct svc_stat *,
  52.                       const struct file_operations *);
  53. void            svc_proc_unregister(const char *);
  54.  
  55. void            svc_seq_show(struct seq_file *,
  56.                      const struct svc_stat *);
  57.  
  58. extern struct proc_dir_entry    *proc_net_rpc;
  59.  
  60. #else
  61.  
  62. static inline struct proc_dir_entry *rpc_proc_register(struct rpc_stat *s) { return NULL; }
  63. static inline void rpc_proc_unregister(const char *p) {}
  64. static inline void rpc_proc_zero(struct rpc_program *p) {}
  65.  
  66. static inline struct proc_dir_entry *svc_proc_register(struct svc_stat *s,
  67.                                const struct file_operations *f) { return NULL; }
  68. static inline void svc_proc_unregister(const char *p) {}
  69.  
  70. static inline void svc_seq_show(struct seq_file *seq,
  71.                 const struct svc_stat *st) {}
  72.  
  73. #define proc_net_rpc NULL
  74.  
  75. #endif
  76.  
  77. #endif /* _LINUX_SUNRPC_STATS_H */
  78.